import request from '@/utils/request'

// 扫码判断是工单还是订单
export function judgeOrdersByScan(params) {
  return request({
    url: '/api/orders/scan/judge',
    method: 'get',
    params
  })
}

// 查询工单附件
export function getWorkordersSelectAppendixWorkorder(params) {
  return request({
    url: '/api/workorders/select/appendix/workorder',
    method: 'get',
    params
  })
}
// 附件类型
export function getAppendixEnums() {
  return request({
    url: '/api/appendix/enums',
    method: 'get'
  })
}

// 根据批次号查询物料信息跟批次信息
// export function allocationGetBarDetails(barCode,code) {
//   return request({
//     url: `/wms/allocation/getBarDetails/${barCode}/${code}`,
//     method: 'get'
//   })
// }
export function allocationGetBarDetails(barCode,code) {
  return request({
    url: `/wms/allocation/getBarSmDetails`,
    method: 'post',
    data:{
      barCode:barCode,
      warehouseCode:code
    }
  })
}